package com.zkgengkun.domain;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Project: springboot
 * Package: com.zkgengkun.domain
 *
 * @author : Shik
 * @date : 2018/8/28 16:44
 */
@Entity(name = "test")
public class Test {

    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid") //这个是hibernate的注解/生成32位UUID
    @GeneratedValue(generator = "idGenerator")
    @Column(length = 32)
    private String id;

    @Column(length = 32)
    private String name;
}
